﻿using System;
using System.Collections.Generic;
using System.Text;

namespace 接口
{
    class Tea
    {
        interface ISwitch
        {
            //接口不能有修饰符
            void On();
            void Off();
            int Myint();
            //  public  int a;//接口不能包含方法（属性、索引）之外的成员
        }

        public class Teas : ISwitch
        {
            private string id;
            public string Id { get { return id; } }
            public Teas(string _id) { this.id = _id; }
            public void On()
            {
                Console.WriteLine("你想开启这个开关吗？");
                Console.WriteLine("                     ^ 0 ^ ");
                Console.WriteLine("按下回车吧");
                Console.ReadLine();
                Console.WriteLine("        已开启，再按一次回车关闭");
                Console.WriteLine();
                Console.ReadLine();
            }
            public void Off()
            {
                Console.WriteLine("       已关闭，再按下回车看看？");
                Console.ReadLine();
                Console.WriteLine("                  都关了你还按！你再按一次？！");

            }
            public int Myint()
            {
                return 0;
            }
        }
    }
}
